<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Functional API</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="philosophy.parallel.html">« Philosophy</a></li>
      <li style="float: right;"><a href="parallel.bootstrap.html">parallel\bootstrap »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.parallel.html">parallel</a></li>
    <li>Functional API</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="functional.parallel" class="reference">
 <h1 class="title">Functional API</h1>
 <div class="partintro">
  <p class="para">
   The <span class="classname"><a href="class.parallel-runtime.html" class="classname">parallel\Runtime</a></span> API provides a great degree of control to the power PHP programmer, and those intimately familiar with writing applications that use
   parallel concurrency.
  </p>
  <p class="para">
   The functional API provides less control in exchange for the ability to make decisions for the programmer:
   <ul class="itemizedlist">
    <li class="listitem">
    <p class="para">all executing runtimes are bootstrapped identically</p>
    </li>
    <li class="listitem">
    <p class="para">scheduling is determined by the API, not the programmer</p>
    </li>
   </ul>
   <span class="function"><a href="parallel.run.html" class="function">parallel\run()</a></span> provides the guarantee that the task will begin to execute in parallel as soon as allowed by hardware and operating system constraints, without
   needlessly creating runtimes. For most applications the functional API should be preferred.
  </p>
 </div>

 





 





<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="parallel.bootstrap.html">parallel\bootstrap</a> — Bootstrapping</li><li><a href="parallel.run.html">parallel\run</a> — Execution</li></ul>
</div>
</div></div></body></html>